//
//  SFirVC.swift
//  OCBrigdeSwiftDemo
//
//  Created by chenzm on 2018/8/8.
//  Copyright © 2018年 chenzm. All rights reserved.
//

import UIKit
import Foundation
class SFirVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.red;
        
        self.initBaseUI()
        
        self.initBaseData();
    }
    
    func initBaseData(){
        OTools .log(withAddress: "北京市", gender: "男");
        let tools = OTools.init()
        tools.log(byAddress: "福建省", gender: "女");
    }
    
    
    ///=== UI创建
    func initBaseUI(){
        self.addbtn()
    }
    
    ///添加按钮
    func addbtn(){
        let btn = UIButton.init(type: .custom);
        btn.backgroundColor = UIColor.white;
        btn.frame = CGRect(x:100,y:100,width:100,height:100);
        btn.addTarget(self, action: #selector(btnAction(sender:)), for: .touchUpInside);
        self.view.addSubview(btn);
    }
    
    
    
    ///=== 方法调用

    func btnAction(sender:UIButton){
        self.dismiss(animated: true) {
            
        };
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}
